<?php
namespace addons\sum\validate\store;

use think\Validate;

class Apply extends Validate
{
    protected $rule = [
        'store_name' => 'require',
        'user_name' => 'require',
        'phone' => 'require|regex:^1\d{10}$',
        'image_sfzrx' => 'require',
        'image_sfzgh' => 'require',
        'image_business_license' => 'require',
    ];
    protected $message  =   [
        'store_name.require' => '请输入商户名称',
        'user_name.require' => '请输入用户姓名',
        'phone.require' => '请输入联系电话',
        'phone.regex' => '请输入正确的联系电话',
        'image_sfzrx.require' => '请上传身份证人像照',
        'image_sfzgh.require' => '请上传身份证国徽照',
        'image_business_license.require' => '请上传营业执照',
    ];
    protected $scene = [
        'apply' => ['store_name', 'user_name', 'phone','image_business_license'],
    ];

}
